package org.leviatan.dataharbour.core.model.control;


import org.leviatan.dataharbour.core.model.Sender;
import org.leviatan.dataharbour.core.model.impl.SenderImpl;
import org.w3c.dom.Element;

public abstract class SenderHandler {
	
	public static Sender instantiateModel(Element e) {
		String id = e.getElementsByTagName("id").item(0).getTextContent();
		
		Sender s = new SenderImpl();
		
		s.setId(id);
		
		return s;
	}
	
	public static String convertToXml(Sender s) {
		String xml = "";
		xml += "\n\t\t<id><![CDATA["+ s.getId()+ "]]></id>";
		return xml;
	}

}
